home *** CD-ROM | disk | FTP | other *** search
- public class Message {
- public static final int FROM = 0;
- // $FF: renamed from: TO int
- public static final int field_0 = 1;
- public static final int REPLYTO = 2;
- public static final int DATE = 3;
- public static final int SUBJECT = 4;
- public static final int CONTENTTYPE = 5;
- // $FF: renamed from: CC int
- public static final int field_1 = 6;
- public static final int BCC = 7;
- public static String[] headerItems = new String[]{"From:", "To:", "Reply-To:", "Date:", "Subject:", "Content-Type:"};
- // $FF: renamed from: ID int
- public int field_2 = -1;
- public String from = "";
- // $FF: renamed from: to java.lang.String
- public String field_3 = "";
- public String replyTo = "";
- // $FF: renamed from: cc java.lang.String
- public String field_4 = "";
- public String bcc = "";
- public String subject = "";
- public String date = "";
- public String contentType = "";
- public boolean unread = true;
- public String body = "";
-
- public void appendBody(String var1) {
- this.body = this.body + var1;
- }
-
- public void appendItem(String var1, int var2) {
- switch (var2) {
- case 0:
- this.from = this.from + var1;
- break;
- case 1:
- this.field_3 = this.field_3 + var1;
- break;
- case 2:
- this.replyTo = this.replyTo + var1;
- break;
- case 3:
- this.date = this.date + var1;
- break;
- case 4:
- this.subject = this.subject + var1;
- break;
- case 5:
- this.contentType = this.contentType + var1;
- break;
- case 6:
- this.field_4 = this.field_4 + var1;
- break;
- case 7:
- this.bcc = this.bcc + var1;
- }
-
- }
-
- public String getItem(int var1) {
- switch (var1) {
- case 0:
- return this.from;
- case 1:
- return this.field_3;
- case 2:
- return this.replyTo;
- case 3:
- return this.date;
- case 4:
- return this.subject;
- case 5:
- return this.contentType;
- case 6:
- return this.field_4;
- case 7:
- return this.bcc;
- default:
- return null;
- }
- }
-
- public void printProperties() {
- MicroMail.printInfo("********** start print MessageHeader properties- **********");
- MicroMail.printInfo(this.from);
- MicroMail.printInfo(this.field_3);
- MicroMail.printInfo(this.replyTo);
- MicroMail.printInfo(this.field_4);
- MicroMail.printInfo(this.bcc);
- MicroMail.printInfo(this.subject);
- MicroMail.printInfo(this.date);
- MicroMail.printInfo(this.contentType);
- MicroMail.printInfo("********** end print MessageHeader properties- **********");
- }
-
- public void setItem(String var1, int var2) {
- if (var2 > -1) {
- var1 = trimHeaderItem(var1, var2);
- }
-
- switch (var2) {
- case 0:
- this.from = var1;
- break;
- case 1:
- this.field_3 = var1;
- break;
- case 2:
- this.replyTo = var1;
- break;
- case 3:
- this.date = var1;
- break;
- case 4:
- this.subject = var1;
- break;
- case 5:
- this.contentType = var1;
- break;
- case 6:
- this.field_4 = var1;
- break;
- case 7:
- this.bcc = var1;
- }
-
- }
-
- public static int startsWithHeaderItem(String var0) {
- for(int var1 = 0; var1 < headerItems.length; ++var1) {
- if (var0.startsWith(headerItems[var1])) {
- return var1;
- }
- }
-
- return -1;
- }
-
- public static String trimHeaderItem(String var0, int var1) {
- return var0 != null ? var0.substring(headerItems[var1].length()) : var0;
- }
- }
-